<template>
<!-- $attrs传人内部组件 -->
    <div>
        <h1>B component!!{{myname}}----{{$attrs}}</h1>
        <button @click="handle">B按钮</button>
        <comp-textc v-bind="$attrs"></comp-textc>
    </div>
</template>

<script>
import CompTextc from "./CompTextc.vue"
    export default{
        props:["myname"],
        data(){
            return{
                age:22
            }
        },
        components:{
                CompTextc

        },
        created(){
            console.log(this.$listeners)
        },
        methods:{
            handle(){
                this.$emit("myhandle","188cm")
            }
        }
    }
</script>

<style>
</style>